﻿Imports System.ServiceModel

Namespace Contract

    Public Class ApplicationServer

        Public Shared Sub Open(ByVal instance As Object)

            Try
                Dim uri = New Uri("net.pipe://Co9320/NamaAlert/API")
                Dim binding = New NetNamedPipeBinding(NetNamedPipeSecurityMode.None)
                Dim host = New ServiceHost(instance, uri)

                host.AddServiceEndpoint(GetType(IApplicationService), binding, String.Empty)
                host.Open()

            Catch ex As Exception
                Stop
            End Try

        End Sub



    End Class

End Namespace
